<?php

namespace app\admin\model;

/**
 * 小程序登录用户表
 */
class User extends Base
{

    // 昵称字符转换
    public function getNickNameAttr($data){
        return urldecode($data);
    }

    public static function getByOpenID($openid){
        $user = self::where('openid','=',$openid)->find();

        return $user;
    }
}